package cn.itsource.order.controller;


import cn.itsource.basic.util.AjaxResult;
import cn.itsource.order.service.IUserAddressService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("userAddress")
@Slf4j
public class UserAddressController {

    @Autowired
    private IUserAddressService userAddressService;

    /**
     * 获取所有的用户地址
     * @return
     */
    @GetMapping("list")
    public AjaxResult list(){


        return AjaxResult.createSuccess(userAddressService.findUserAddresses());
    }



}
